﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="AdminForAdvertisementUpload.aspx.cs" Inherits="FYPHP.AdminForAdvertisementUploads" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="LeftContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
   <script type="text/javascript">       var num = 0; </script>
    <asp:Repeater ID="ItemList" runat="server" EnableViewState="False" 
        onitemcommand="ItemList_ItemCommand">
        <HeaderTemplate>
            <h2>
                Advertisments Manage</h2>
            <table cellpadding="5" cellspacing="5" width="722" border="1px solid #ffffff" align="center" style="border-collapse: collapse; border-color: #aaaaaa; text-align: center">
                <tr style="background-color: #eee; font-weight: bold;">
                    <td width="20px">
                        No.</td>
                    <td width="25">
                        Image</td>
                    <td align="left">
                        Advertisement Link</td>
                    <td width="50">
                        Status</td>
                    <td width="50">
                        Duration</td>
                    <td width="205">
                        Actions</td>
                </tr>
        </HeaderTemplate>
        <ItemTemplate>
            <tr>
                <td>
                    <script type="text/javascript">
num += 1; document.write(num);</script>
                </td>
                <td align="center">
                    <img src="\uploads\ads\<%#DataBinder.Eval(Container.DataItem, "a_picture" ) %>" alt="" height="25px" width="25px" />
                </td>
                <td style="text-align: left">
                    <a href="<%#DataBinder.Eval(Container.DataItem, "a_link" ) %>" target="_blank">
                    <%#DataBinder.Eval(Container.DataItem, "a_link" ) %></a>
                    <br />
                    <span style="font-size:11px; text-align: right; color: #888;"><i>
                    <%#DataBinder.Eval(Container.DataItem, "a_date" ) %></i></span>
                </td>
                <td style="text-align: center; text-transform : capitalize;">
                    <%#DataBinder.Eval(Container.DataItem, "a_status" ) %>
                </td>
                <td style="text-align: center">
                    <%#DataBinder.Eval(Container.DataItem, "a_duration" ) %>days</td>
                <td>
                    <asp:Button ID="btnApprove" runat="server" Text="Publish" CommandName="PublishAds" 
        CommandArgument='<%# Eval("a_id").ToString() %>' />
                    <asp:Button ID="btnReject" runat="server" Text="Reject" CommandName="RejectAds"
        CommandArgument='<%# Eval("a_id").ToString() %>' />
                </td>
            </tr>
        </ItemTemplate>
        <FooterTemplate>
            </table>
        </FooterTemplate>
    </asp:Repeater>
</asp:Content>
